<?php
/**
 * Copyright (C) Alibaba Cloud Computing
 * All rights reserved
 */

require_once realpath(dirname(__FILE__) . '/Request.php');

/**
 *
 *
 * @author log service dev
 */
class Aliyun_Log_Models_UpdateLogtailRequest extends Aliyun_Log_Models_Request
{
    private $configName;
    private $inputType;
    private $outputType;
    private $outputDetail;
    private $inputDetail;

    /**
     * Aliyun_Log_Models_CreateMachineGroupRequest Constructor
     *
     */
    public function __construct($project, $logstore, $config_name, $log_path)
    {
        parent::__construct($project);
        $this->configName   = $config_name;
        $this->inputType    = 'file';
        $this->outputType   = 'LogService';
        $this->outputDetail = [
            'projectName'  => $project,
            'logstoreName' => $logstore,
        ];

        $this->inputDetail = [
            'localStorage'   => true,
            'topicFormat'    => 'none',
            'timeKey'        => '',
            'timeFormat'     => '%Y-%m-%d %H:%M:%S',
            'maxDepth'       => 10,
            'discardUnmatch' => false,
            'logType'        => 'json_log',
            'logPath'        => $log_path,
            'filePattern'    => '*.log',
            'fileEncoding'   => 'utf8',
        ];
    }

    public function getConfigName()
    {
        return $this->configName;
    }

    public function getInputType()
    {
        return $this->inputType;
    }

    public function getOutputType()
    {
        return $this->outputType;
    }

    public function getOutputDetail()
    {
        return $this->outputDetail;
    }

    public function getInputDetail()
    {
        return $this->inputDetail;
    }
}
